﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace OAPlatform.DomainModel.Model
{
    public interface IAuthenticatable
    {
        /// <summary>
        /// 权限集
        /// </summary>
        List<Role> Roles { get; set; }

        /// <summary>
        /// 测试实体是否具有指定的权限
        /// </summary>
        /// <param name="permissionKey">要测试的权限的标识</param>
        /// <returns>有权限返回true，否则返回false</returns>
        bool Authenticate(string permissionKey);
    }
}
